package com.ace.slide.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

import com.ace.slide.model.Enums.ThemeEnum;

@Entity
public class Profile {
	private long profileId;
	private long memberId;
	private String email;
	private Date memberSince;
	private Date lastLogin;
	private ThemeEnum theme;
	private Set<Address> addresses;
	private Set<Album> albums;
	
	
	public Profile() {
		super();
		// TODO Auto-generated constructor stub
		albums = new HashSet<Album>();
		addresses = new HashSet<Address>();
	}


	@Id
	@GeneratedValue
	public long getProfileId() {
		return profileId;
	}
	public void setProfileId(long profileId) {
		this.profileId = profileId;
	}
	public long getMemberId() {
		return memberId;
	}
	public void setMemberId(long memberId) {
		this.memberId = memberId;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Date getMemberSince() {
		return memberSince;
	}
	public void setMemberSince(Date memberSince) {
		this.memberSince = memberSince;
	}
	public Date getLastLogin() {
		return lastLogin;
	}
	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}
	public ThemeEnum getTheme() {
		return theme;
	}
	public void setTheme(ThemeEnum theme) {
		this.theme = theme;
	}
	
	@OneToMany
	@JoinColumn(name="profileId")
	public Set<Address> getAddresses() {
		return addresses;
	}
	public void setAddresses(Set<Address> addresses) {
		this.addresses = addresses;
	}
	
	@OneToMany
	@JoinColumn(name="profileId")
	public Set<Album> getAlbums() {
		return albums;
	}
	public void setAlbums(Set<Album> albums) {
		this.albums = albums;
	}
}
